home *** CD-ROM | disk | FTP | other *** search
- MiNT Library for Turbo C / Pure C
-
- hohmuth 7 Mar 1993
-
- This file describes the build and installation procedure of the MiNT
- library for Turbo C and Pure C for the binary distribution. (If you
- have the source distribution, see the file INSTALL.SRC. For notes on
- how to use the library, refer to README.PC.)
-
- This file is shipped with both the Pure C and the Turbo C binary
- distributions. If you have the distribution for Pure C, ignore
- everything which refers to Turbo C, and vice versa.
-
- --------------------------------------------------------------------------
-
- Building the MiNT library from the binary distribution means linking the
- distributed files with the math libraries from Pure's/Turbo's distribution
- (which are not freely distributable).
-
- The binary distribution consists of at least the following files:
- makefile, tosify.mak, mintlib.lib, d_flt.lib, crt0.o and alloca.o. The
- Pure C distribution additionally contains d_881.lib and falloca.o.
-
- There are several ways to build the math libraries:
-
- (a) You could do it using Make and the supplied makefile, as described
- below.
-
- (b) You could also issue the one or two nessecary commands by hand using
- your favourite shell; this is probably the easiest way:
-
- Pure C: plink.ttp -J -G -O=mintflt.lib d_flt.lib pcfltlib.lib
- plink.ttp -J -G -O=mint881.lib d_881.lib pc881lib.lib
-
- Turbo C: tlink.ttp -J -G -O=mintflt.lib d_flt.lib tcfltlib.lib
-
- (c) You could write yourself a Pure/Turbo C Project file that links the
- parts together.
-
- The rest of this file describes option (a) in more detail:
-
- You need the following tools to build the library:
-
- o The compiler's tools (of course), in particular `pcc.ttp', `pasm.ttp'
- and `plink.ttp' (resp. for Turbo C: `tcc.ttp', `mas.ttp' and
- `tlink.ttp').
-
- o GNU Make, version 3.60 or better. (The makefile needs GNU Make's
- functionality, so please don't try another Make.)
-
- o If you want to be able to do `make install' and such, you additionally
- need `cp'. (I recommend that from the GNU file utilities, linked with
- the MiNT library PL 25 or above; it will then understand file names
- like "/dev/a/foo" instead of "A:\foo".)
-
- To build the MiNT library, the following steps are nessecary:
-
- 1) Edit the `makefile' to suit your taste. You should only have to edit
- the configuration section at the beginning of the file. Simply
- follow the instructions given as comments in the makefile. (Comments
- are on lines starting with `#'.)
-
- Here is a list of Make variables which have to be configured, and
- their default:
-
- COMPILERDIR= /dev/d/pc # compiler's dir.
- LIBDIR= $(COMPILERDIR)/lib # compiler's lib dir
- COMPILERINCDIR= $(COMPILERDIR)/include # compiler's include dir
- INCLUDEDIR= /dev/g/gnu/include # MiNT lib's include dir
- INSTALLDIR= $(LIBDIR) # where to install MiNT lib
- TOSIFY_NAMES= yes # compiler's tools need old style file names
- TOSIFY_COMMAND= # undef'd means "shell groks Un*x file names"
- sh_backslash= \\ # bourne shell needs escaped backslashes
- SHELL= /bin/sh # I use a standard Bourne shell
- RM= rm # remove command
- INSTALL_DATA= cp # install command
-
- The other configurable Make variables should be left as they are;
- they are only needed when building the library from the source. The
- Make variable TURBOC should only be defined if you use Turbo C.
-
- A somewhat difficult decision is which shell to use. I use a standard
- bourne shell (from the BSD networking distribution); Bash (the GNU
- Bourne Again Shell), Mupfel 1.89 or better (which comes with Gemini)
- and `shell.ttp' (from the Elvis for MiNT distribution) also work.
- Mupfel 1.21 will _not_ work. I haven't tried Gulam, but I presume it
- works too. You could also try specifying no shell at all and have
- make executing your commands.
-
- Depending on your shell, you need to configure the Make variables
- SHELL, TOSIFY_COMMANDS and sh_backslash. Here are the settings for
- the shells I tried:
-
- sh, bash sh_backslash = \\
- shell.ttp sh_backslash = \$(nothing)
- mupfel.ttp sh_backslash = \$(nothing), TOSIFY_COMMANDS = yes
-
- 2) Copy the files math.h and float.h from your compiler's distribution
- to the MiNT library's include directory, renaming them to tcmath.h
- and tcfloat.h.
-
- The following command does this for you:
-
- make install-includes
-
- 3) You're ready to build the library now. Hit
-
- make
-
- This builds the following files: mintlib.lib (if it did not already
- exist) and mintflt.lib. In the Pure C distribution, additionally the
- file mint881.lib will be built.
-
- 4) You are now ready to install the library (which consists of the
- following files: mintlib.lib, mintflt.lib, crt0.o, alloca.o, and
- for Pure C additionally mint881.lib and falloca.o). Do this by
- invoking
-
- make install
-
-
-